Extract rule: template-no-dynamic-subexpression-invocations#2467
Conversation
0ff5816 to
be6400b
Compare
|
Claude review comparing with ember-template-lint rule: Behavioral extension: body-context mustaches flaggedThe original only flags case 'MustacheStatement': {
let isAttr = parents.some((it) => it.node.type === 'AttrNode');
if (isAttr && isDynamic && hasArguments) {
this.log({ ... });
}
}The PR adds an extra branch that flags this.* paths in body context too: This means {{this.formatter this.data}} in body context is flagged by the PR but NOT by the original. This is new behavior that would cause false positives for users migrating from ember-template-lint. Could be fixed by match the original byr removing !inAttr block should be removed to match the original, or keep the change. Generic error messageThe original gives context-specific messages:
The PR uses a single generic message for all cases: "Do not use dynamic helper invocations. Use explicit helper names instead." The original messages are more actionable — they tell the user what node type is Local scope tracking (minor)The PR implements its own localScopes stack vs the original's this.scope.isLocal(). The implementation is reasonable for the eslint context and doesn't cause behavioral differences in practice — the |
Split from #2371.